<?php
defined('IN_PHPCMS') or exit('No permission resources.');
function printImage($func, $imageFile)
{
    $array = getimagesize($imageFile);
    Common::println("$func, image width: " . $array[0]);
    Common::println("$func, image height: " . $array[1]);
    Common::println("$func, image type: " . ($array[2] === 2 ? 'jpg' : 'png'));
    Common::println("$func, image size: " . ceil(filesize($imageFile)));
}
	$oss_file = "http://img.chunmeitu.com/uploadfile/2018/0308/20180308110851401.jpg";
	require_once 'api/oss_upload/autoload.php';
	exit;
	$oss = new \OSS\OssClient(OSS_AKID, OSS_AKS, OSS_ENDPOINT);
	$oss_file = str_replace(OSS_PATH, '', $oss_file);
		exit;
	$options = array(
    	OssClient::OSS_FILE_DOWNLOAD => $oss_file,
    	OssClient::OSS_PROCESS => "image/resize,m_fill,w_220,h_330,limit_0/auto-orient,1",
    );
	$result = $oss->getObject(OSS_BUKET, $oss_file, $options);
	//printImage("iamgeCrop", $download_file);
	var_dump($result);